<?php
	include("../connect/connect_dsccmis.php");
	//วันที่ปัจจุบัน
	$tempY=date("Y");
	if($tempY<"2550"){
		$tempY=(int)$tempY+543;
	}
	$datetime_call= $tempY.date("m");
	
	$sql = "call dscc.createTempDSCCForMCC('$datetime_call')";
	$rs=mysql_query($sql);
	echo "<br>complete call dscc.createTempDSCCForMCC";
	$sql = "drop table if exists mis_tempdsccformcc;";
	$rs=mysql_query($sql);
	$sql = "create table mis_tempdsccformcc as select * from dscc.tempdsccformcc";
	$rs=mysql_query($sql);
	echo "<br>complete create mis_tempdsccformcc";
	/*$sql = "drop table if exists mis_tempdsccformcc90;";
	$rs=mysql_query($sql);
	$sql = "create table mis_tempdsccformcc90 as select * from dscc.tempdsccformcc90";
	$rs=mysql_query($sql);
	$sql = "drop table if exists mis_tempdsccformcc91;";
	$rs=mysql_query($sql);
	$sql = "create table mis_tempdsccformcc91 as select * from dscc.tempdsccformcc91";
	$rs=mysql_query($sql);
	$sql = "drop table if exists mis_tempdsccformcc94;";
	$rs=mysql_query($sql);
	$sql = "create table mis_tempdsccformcc94 as select * from dscc.tempdsccformcc94";
	$rs=mysql_query($sql);
	$sql = "drop table if exists mis_tempdsccformcc95;";
	$rs=mysql_query($sql);
	$sql = "create table mis_tempdsccformcc95 as select * from dscc.tempdsccformcc95";
	$rs=mysql_query($sql);
	$sql = "drop table if exists mis_tempdsccformcc96;";
	$rs=mysql_query($sql);
	$sql = "create table mis_tempdsccformcc96 as select * from dscc.tempdsccformcc96";
	$rs=mysql_query($sql);*/
	//mysql_close($c);
?>